package com.gbk.clickhouseservicestruct.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.myweb.ck.mapping.ChTable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * @Project: nacos-server-parent
 * @Package: com.les.its.ds.model
 * @Author： mujian
 * @Create： 2023/2/23 17:01
 * @Description： TODO
 * @History: modify
 */
@ChTable(name = "tig.T_TIG_CROSSING_EVENT")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TIG_CROSSING_EVENT {

    /**
     * ID 主键 唯一
     */
    private String id;

    /**
     * 路口ID
     */
    private String cross_id;

    private Integer event_id;

    private String content;

    private String site_name;

    private Double longitude;

    private Double latitude;

    private Integer duration_minute;

    private Integer influence_region;

    /**
     * 数据存储时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date occur_time;

}
